import "package:flutter/cupertino.dart";
import "package:flutter/material.dart";
import 'package:moose_app/core/utils/navigate_util.dart';
import 'package:moose_app/ui/screens/address_add/address_add_screen.dart';
import "package:moose_app/ui/values/values.dart";

import 'address_receiving_body.dart';

class ATHAddressReceivingScreen extends StatelessWidget {
  static final String routeName = "app://receivingAddress";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("我的收货地址"),
        centerTitle: false,
      ),
      body: ATHAddressReceivingBody(),
      bottomNavigationBar: _buildReceivingAddress(context),
    );
  }

  Widget _buildReceivingAddress(BuildContext context) {
    return SafeArea(
      child: GestureDetector(
        onTap: () {
          ATHNavigator.pushFromRight(context, ATHAddressAddScreen.routeName);
        },
        child: Container(
          height: kSize80,
          margin: EdgeInsets.symmetric(horizontal: kSize30, vertical: kSize20),
          child: Container(
            height: kSize100,
            width: kSize180,
            decoration: BoxDecoration(
//                gradient: LinearGradient(colors: [kColorFF6200, kColorFF5000]),
                gradient:
                    LinearGradient(colors: [kColorPrimary, kColorPrimary]),
                borderRadius: BorderRadius.circular(kSize50)),
            alignment: Alignment.center,
            child: Text(
              "添加收货地址",
              style: TextStyle(color: kColorF1, fontSize: kFontSize32),
            ),
          ),
        ),
      ),
    );
  }
}
